﻿@using MvcContrib.Pagination;
@using Shp.Web.Models.Domain;

@model IPagination<Customer>

@{
    ViewBag.Title = "Themed Grid";
}

<div id="switcher"></div>

<ul id="echo"></ul>

<div class="ui-helper-clearfix">
    <h2 class="float-left">Themed Grid</h2>    
</div>

<p>
    @Html.ActionLink("Return to Grid Index", "Index", null, new { @class = "btn" })
</p>

<div id="mvccontribGridWrapper">
    @Html.Partial("_ThemedGrid", Model)
</div>

<script type="text/javascript">
    $(document).ready(function () {       
        var options = {
            url: "@Url.Action("ThemedGrid")", 
            alignRight: true,
            addRowOverState: true,
            addSelectedState: true,
            onRequestStarting: eh.requestStarting,
            onRequestEnding: eh.requestEnding,
            onRequestEnded: eh.requestEnded
        };
        $("#mvccontribGridWrapper").mvccontribGrid(options);
        $("a.btn").button();
    });
</script>

<p>
    @Html.ActionLink("Return to Grid Index", "Index", null, new { @class = "btn" })
</p>

@section Head{
    <script src="@Url.Content("~/Scripts/echo.js")" type="text/javascript"></script>
    @Html.Partial("_Grid.Resources.Themed")
}